From: Kenichi Handa Date: Mon, 29 Mar 2004 12:01:21 +0000 (+0000) Subject: (ucs-insert): Fix the error message. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23434 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=8b24844eff2e9db9bd9ef15b768a8e99dff1ab57;p=emacs.git (ucs-insert): Fix the error message. --- diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el index 476c8dfc191..a7d05610a80 100644 --- a/lisp/international/ucs-tables.el +++ b/lisp/international/ucs-tables.el @@ -1247,12 +1247,14 @@ unification on input operations." "Insert the Emacs character representation of the given Unicode. Interactively, prompts for a hex string giving the code." (interactive "sUnicode (hex): ") - (let ((c (decode-char 'ucs (if (integerp arg) - arg - (string-to-number arg 16))))) + (or (integerp arg) + (setq arg (string-to-number arg 16))) + (let ((c (decode-char 'ucs arg ))) (if c (insert c) - (error "Character can't be decoded to UCS")))) + (if (or (< arg 0) (> arg #x10FFFF)) + (error "Not a Unicode character code: 0x%X" arg) + (error "Character U+%04X is not yet supported" arg))))) ;;; Dealing with non-8859 character sets.